<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
<title>Uploadify</title> 
<link href="/uploadify/uploadify.css" rel="stylesheet" type="text/css" /> 
<script type="text/javascript" src="/uploadify/swfobject.js"></script> 
<script type="text/javascript" src="/uploadify/jquery.uploadify.v2.1.4.min.js"></script> 
<link href="/assets/js/validate/jquery.validate.css" type="text/css" rel="stylesheet"/>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js" type="text/javascript"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/additional-methods.min.js" type="text/javascript"></script>
<script type="text/javascript"> 
$(document).ready(function() 
{ 
$("#upload_apk").uploadify({ 
'uploader': '/uploadify/uploadify.swf', 
'script': '/uploadify/uploadify.php', 
'cancelImg': '/uploadify/cancel.png', 
'folder': '/uploads', 
'queueID': 'fileQueue', 
'auto': true, 
'multi': false,
'onComplete': function(event, queueID, fileObj, response, data) {
	$('#filesUploaded_apk').html(
		'<a href='+fileObj.filePath+'>'+fileObj.name+'</a> <input name="filePath" type="hidden" value="'+fileObj.filePath+'">'
	);
 }

}); 
}); 

$(document).ready(function() 
{ 
$("#upload_apk_img").uploadify({ 
'uploader': '/uploadify/uploadify.swf', 
'script': '/uploadify/uploadify.php', 
'cancelImg': '/uploadify/cancel.png', 
'folder': '/uploads', 
'queueID': 'fileQueue', 
'auto': true, 
'multi': false,
'onComplete': function(event, queueID, fileObj, response, data) {
	$('#filesUploaded_apk_img').html(
		'<a href='+fileObj.filePath+'>'+fileObj.name+'</a> <input name="filePath_img" type="hidden" value="'+fileObj.filePath+'">'
	);
 }

}); 
}); 

    $(function() {
        $("#inputForm").validate({
            submitHandler: function(form) {
                ShowMsg();
                form.submit();
            }
        });
    });

</script> 

<div id="page" class="wrapper w_960 clearfix">
  <h2 class="heading">修改主题 </h2>
  <div id="content" class="col first_col b1">
    <form id="inputForm" action="/admin/theme/modify_save" method="post">
	  <input name="theme_id"  type="hidden" id="theme_id" class="inputs med " value="<?php echo $theme->id;  ?>">
      <div class="row clearfix">
        <label for="theme_name">主题名:</label>
        <p><span>
		<input name="theme_name" maxlength="100" id="theme_name" class="inputs med required" value="<?php echo $theme->name;  ?>">
          </span><span id="themeNameError"></span></p>
      </div>
      <div class="row clearfix">
        <label for="theme_title">title:</label>
        <p><span>
          <input name="theme_title" maxlength="100" id="theme_title" class="inputs med required" value="<?php echo $theme->title;  ?>">
          </span></p>
      </div>

	<div class="row clearfix">
      <label for="desc">Description :</label>
      <p><span>
        <textarea id="descriptions" name="descriptions" class="inputs med long required" rows="10" ><?php echo $theme->description;  ?></textarea>
        </span></p>
    </div>

		<div class="row clearfix">
        <label for="price_rmb">人民币价格:</label>
        <p><span>
          <input name="price_rmb" maxlength="10" id="price_rmb" class="inputs med required number" value="<?php echo $theme->price_rmb;  ?>">
          </span></p>
      </div>

	<div class="row clearfix">
        <label for="price_usd">美元价格:</label>
        <p><span>
          <input name="price_usd" maxlength="10" id="price_usd" class="inputs med required number" value="<?php echo $theme->price_usd;  ?>">
          </span></p>
      </div>

	<div class="row clearfix">
        <label for="score">积分:</label>
        <p><span>
          <input name="score" maxlength="10" id="score" class="inputs med required number" value="<?php echo $theme->score;  ?>">
          </span></p>
      </div>
      
		<div class="row clearfix">
			<label for="apk">apk程序 :</label>
			<input type="file" name="upload_apk" id="upload_apk" /> 
			<div id="filesUploaded_apk">
				<a href='<?php echo $theme->apk_url;  ?>'><?php echo $theme->apk_url;  ?></a>
				<input name="filePath" type="hidden" class="inputs med required" value="<?php echo $theme->apk_url;  ?>">
			</div> 
      </div>

	<div class="row clearfix">
			<label for="apk_img">apk图 :</label>
			<input type="file" name="upload_apk_img" id="upload_apk_img" /> 
			<div id="filesUploaded_apk_img">
				<a href='<?php echo $theme->preview_url;  ?>'><?php echo $theme->preview_url;  ?></a>
				<input name="filePath_img" type="hidden" class="inputs med required" value="<?php echo $theme->preview_url;  ?>">
			</div> 
	  </div>

	  <div class="row clearfix">
        <input type="submit" name="submitBtn" id="submitBtn" class="submit" value="Update">
      </div>
    </form>
  </div>
  <div id="sidebar" class="col last_col b2" style="display: none;">
    <div class="note">
      <h4>Note</h4>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eros lectus, sollicitudin at vestibulum sit amet, elementum et libero. Mauris neque purus, consectetur eget vulputate quis, dapibus ac tortor.</p>
    </div>
  </div>
</div>


